<template>
  <div class="app-container calendar-list-container">
    <inquiry-info-head :inquiry_info="inquiry_info"></inquiry-info-head>
    <inquiry-info-detail :mat_list="inquiry_info.mat_list"></inquiry-info-detail>
  </div>
</template>
<script>
  import { inquiryDetail } from '@/api/purchase/inquiry'
  import inquiryInfoDetail from './inquiryInfo_detail.vue'
  import inquiryInfoHead from './inquiryInfo_head.vue'
  export default {
    name:'mprInfo',
    components:{
      inquiryInfoDetail,
      inquiryInfoHead
    },
    data(){
      return {
        inquiry_info:{
          coin:null,
          coin_name:null,
          deal_flag:null,
          delivery_date:null,
          delivery_place:null,
          inquiry_date:null,
          inquiry_id:null,
          invoice_type:null,
          invoice_type_name:null,
          purch_man:null,
          purch_man_email:null,
          purch_man_name:null,
          purch_man_phone:null,
          quote_date:null,
          quote_end_date:null,
          remark:null,
          tax_ratio:null,
          total_price:null,
          mat_list:{
            inquiry_detail_id:null,
            mat_desc:null,
            mat_id:null,
            mat_model:null,
            mat_no:null,
            mat_type_id:null,
            mat_type_name:null,
            process_cost:null,
            process_up:null,
            quantity:null,
            tax_cost:null,
            total_price:null,
            up:null,
          },
          sup_list:{
            sup_company_id:null,
            sup_name:null
          }
        },
        req_info:{
          client_type:1,
          query:{
            inquiry_id:null
          }
        }
      }
    },
    mounted(){
      let inquiry_id = this.$route.query.inquiry_id
      if(inquiry_id){
        this.req_info.query.inquiry_id = inquiry_id
        inquiryDetail(this.req_info)
          .then(res => {
            this.inquiry_info = res.inquiry_info
          })
          .catch(err => {
            console.log(err)
            this.$message.error('查询详情失败!')
          })
      }
    },
    methods:{

    }
  }
</script>
<style scoped lang="scss">

</style>
